<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page buffer="1kb" autoFlush="false" %>
<%@ page import="java.io.PrintWriter" %>
<%@ page import="java.time.LocalDateTime" %>
<html>
    <head>
        <title>out</title>
        <style>
            .wrapper {
                border: 1px solid blue;
                margin: 15px auto;
            }
        </style>
    </head>
    <body>
        <div class="wrapper">
            <p>`out` object: <%= out %></p>
            <p>class name: <%= out.getClass().getName() %> </p>
            <p>通过out对象输出的数据会暂存在JspWriter实例的缓冲区中</p>
            <p>在out对象的缓冲区中的数据最终要通过response.getWriter()输出到响应缓冲区</p>
            <p>JspWriter BufferSize: <%= out.getBufferSize() %></p>
        </div>

        <%
            // 获得可以向响应缓冲区输出数据的字符打印流
            PrintWriter pw = response.getWriter();
            pw.println( "<p>" + LocalDateTime.now() + "</p>");
        %>
    </body>
</html>
